package net.huashitong.Indicators.utils;

import net.huashitong.Indicators.entity.CompletionClassification;

import java.math.BigDecimal;
import java.util.Comparator;

public class ComparatorssUtils implements Comparator<CompletionClassification> {
    @Override
    public int compare(CompletionClassification o2,CompletionClassification o1){
        Double double1 = Double.parseDouble(o2.getPlanneValue());
        Double double2 = Double.parseDouble(o1.getPlanneValue());
        BigDecimal data1 = new BigDecimal(double1);
        BigDecimal data2 = new BigDecimal(double2);
        return data2.compareTo(data1);
    }
}
